<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
    <title>Adherent: Edition</title>
    <link type="text/css" rel="stylesheet" href="skins/Style.css"/>
    <!--link type="text/css" rel="stylesheet" href="skins/forms.css"/-->
    <script src="javascript/adhajout.js" type="text/javascript"></script>
</head>
<body>
      <h3>CONTACT:</h3>
      <p id="contacts">
         <span id="marqueur_specifique"><img src="images/add.gif" alt="+" OnClick="ajoutLigneSaisie()" title="Cliquez ici pour ajouter un contact..."/></span>
      </p>
      <p>
      <input type="Button" ID="Submit" value="Enregistrer" OnClick="CheckForm()"/>
      <!--input type="Button" ID="Cancel" value="Annuler" OnClick="ClearForm()"/-->
      </p>
    </div>
<script>
   var index_ligne = 0;

   function ajoutLigneSaisie(){
	   index_ligne ++;

	   var elem = document.getElementById("contacts");
	   var newDiv = document.createElement("p");
	   var ligneHtml = "<div id=contact_!ID~\"><label>Type: </label><select ID=\"listTYPE_!ID~\"><option value=\"tel\">Telephone</option><option value=\"fax\">Fax</option><option value=\"email\">Email</option><option value=\"autre\">Autre</option></select> <label>Valeur: </label><input ID=\"txtVALEUR_!ID~\"></input><label>Description: </label><input ID=\"txtDESCR_!ID~\"></input> <img src=\"images/add.gif\" alt=\"+\" OnClick=\"ajoutLigneSaisie()\" title=\"Cliquez ici pour ajouter un contact...\"/></div>";

	   if ( index_ligne < 10 ){ligneHtml = ligneHtml.replace(/!ID~/g, "0" + index_ligne);}
	   if ( 9 < index_ligne < 100 ){ligneHtml = ligneHtml.replace(/!ID~/g, "" + index_ligne);}

      if (index_ligne == 1){
         var elem2 = document.getElementById("marqueur_specifique");
         elem.removeChild(elem2);
         newDiv.innerHTML = ligneHtml; 
         elem.appendChild(newDiv);
      }
      else {
      	newDiv.innerHTML = ligneHtml; elem.appendChild(newDiv);
      }      
   }
</script>
      <!--p id="contact1">
		<label>Type:</label>
         <select ID="listTYPE">
            <option value="tel">Telephone</option>
            <option value="fax">Fax</option>
            <option value="email">Email</option>
            <option value="autre">Autre</option>
         </select>
      <label>Valeur:</label><input ID="txtVALEUR"></input>
      <label>Description:</label><input ID="txtDESCR"></input-->

</body>
</html>
